1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 package net.sf.pmr.agilePlanning.service;
36
37 import java.util.Date;
38 import java.util.Set;
39
40 import net.sf.pmr.agilePlanning.domain.iteration.Iteration;
41 import net.sf.pmr.keopsframework.domain.validation.Errors;
42
43 /***
44 * @author Arnaud Prost (arnaud.prost@gmail.com)
45 */
46 public interface IterationService {
47
48 /***
49 * find iterations for a projet (using his persistanceId)
50 * @param peristanceId peristanceId
51 * @return Iteration
52 */
53 Set findByProjectPersistanceId(final int projectPersistanceId);
54
55 /***
56 * find a iteration by its persistance Id
57 * @param persistanceId persistanceId
58 * @return Iteration
59 */
60 Iteration findByPersistanceId(final int persistanceId);
61
62 /***
63 * find by project persistance id and by date
64 * @param projetPersistanceId persistance id of the project to find iteration for.
65 * @param date date to find the iteration for
66 * @return Set of iteration
67 */
68 Iteration findByProjectPersistanceIdAndByDate(final int projetPersistanceId, final Date date);
69
70 /***
71 * add an iteration
72 * @param projectPersistanceId id of the project
73 * @param start start date of the iteration
74 * @param end end date of the iteration
75 * @param releaseid if of the release (0 if any)
76 * @return errors errors
77 */
78 Errors add(final int projectPersistanceId, final Date start, final Date end, final int releaseid);
79
80 /***
81 * Update an iteration
82 * @param projectPersistanceId id of the project
83 * @param start start date of the iteration
84 * @param end end date of the iteration
85 * @param releasePersistanceId if of the release (0 if any)
86 * @param persistanceId of the iteration
87 * @param persistanceVersion persistance version
88 * @return errors errors
89 */
90 Errors update(final int projectPersistanceId, final Date start, final Date end, final int releasePersistanceid, final int persistanceId,
91 final long persistanceVersion);
92
93
94 /***
95 // * Delete an iteration
96 // * @param persistanceId of the iteration
97 // * @param persistanceVersion persistance version
98 // * @return errors errors
99 // */
100
101
102 }